<?php
class commDb
{
    public static function getInstance($db, $type = 'factory', $options = array())
    {
        return commDbMdb::getInstance($db, $type, $options);
    }
}

/*
class commDb
{
    private static $instance = array();
    private static $servers = Array();

    private function __construct() {}
    private function __clone(){}

    public static function getInstance($target='main')
    {
        // 중복 connect 방지를 위해
        if(!array_key_exists($target, self::$instance))
        {
            include_once(SC_DIR_LIB."/inc/inc.database.php");
            switch ($target)
            {
                case 'main':
                default:
                    $dsn = $aDatabase['main']['dns'];
                    $username = $aDatabase['main']['username'];
                    $password = $aDatabase['main']['password'];
                    break;

            }

            self::$instance[$target] = new commDbPdb($dsn, $username, $password);
            self::$instance[$target] -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        }

        return self::$instance[$target];
    }
}
*/